

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>套餐新增</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <#include "../../include/layui.ftl" />
    <style>
        .layui-form-select .layui-input {
            padding-right: 0px;
            cursor: pointer;
        }
    </style>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form layui-form-pane" action="/console/com.fs.common.pojo.Product/newAdd" lay-filter="layer-from">
                <input type="hidden" name="comId" value="${SESSION_USER.user.comId!}">
                <input type="hidden" name="startDate">
                <input type="hidden" name="endDate">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">套餐名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" placeholder="请输入名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">类型</label>
                        <div class="layui-input-block">
                            <select name="type" >
                                <option value="web">网页套餐</option>
                                <option value="basic" disabled>基础检测套餐</option>
                                <option value="one" disabled>首年会员套餐</option>
                                <option value="two" disabled>第二年续费套餐</option>
                                <option value="three" disabled>第三年续费套餐</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">价格（分）</label>
                        <div class="layui-input-block">
                            <input type="text" name="price" lay-verify="required|number" autocomplete="off" placeholder="请设置价格" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">超出价格（分）</label>
                        <div class="layui-input-block">
                            <input type="text" name="exceedPrice" lay-verify="required|number" autocomplete="off" placeholder="请设置价格" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">次数</label>
                        <div class="layui-input-block">
                            <input type="text" name="count" lay-verify="required|number" placeholder="请设置次数" autocomplete="off"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">默认选择</label>
                        <div class="layui-input-block">
                            <input type="checkbox" name="defaultChoice" lay-skin="switch" lay-filter="switchTest" value="true" lay-text="是|否">
                        </div>
                    </div>

                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">介绍</label>
                        <div class="layui-input-block">
                            <input type="text" name="introduce"  placeholder="请输入介绍" autocomplete="off"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">日期时间范围</label>
                        <div class="layui-input-block">
                            <input type="text" id="date" name="date" class="layui-input" placeholder="请设置价格" >
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入备注" name="remark" class="layui-textarea" style="resize: none;"></textarea>
                    </div>
                </div>
                <div class="layui-form-item" hidden>
                    <div class="layui-input-block">
                        <button id="permissionSubmit" class="layui-btn" lay-submit lay-filter="*">
                            保存
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


<script>
    layui.config({
        base: '${path}/plug-in/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form','jquery','laydate'],function () {
        var form = layui.form,
                $ = layui.$,
            laydate = layui.laydate;

        laydate.render({
            elem: '#date'
            ,type: 'datetime'
            ,range: true
            ,done: function(value, date, endDate){
                if(value != ""){
                    var d = value.split(" - ");
                    $("[name=startDate]").val(d[0]);
                    $("[name=endDate]").val(d[1]);
                }
            }
        });
    });
</script>
</body>
</html>
